Method and apparatus for recognizing a character based on a photographed image

ABSTRACT

An apparatus and a method for recognizing a character based on an input image is provided. The apparatus includes an input unit configured to receive the input image and a controller configured to select, from the input image, a region of image analysis to be used for image analysis, and to analyze the selected region of image analysis to determine a type of the input image, to apply, to the input image, an image effect for distinguishing a character region and a background region in the input image if the type of the input image indicates that the input image is obtained by photographing a display screen, to binarize output of the image effect according to the determined type of the input image, and to recognize a character from the binarized output of the image effect.

PRIORITY

This application is a continuation of U.S. patent application Ser. No.13/712,480, which was filed on Dec. 12, 2012 and claims priority under35 U.S.C. §119(a) to an application filed in the Korean IntellectualProperty Office on Dec. 13, 2011 and assigned Serial No.10-2011-0133502, the content of each of which is incorporated herein byreference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates generally to a method and apparatus forrecognizing a character, and more particularly to a method and apparatusfor recognizing a character in a display screen image photographed by acamera.

2. Description of the Related Art

As smartphones become more popular, the use of applications forrecognizing characters from an image obtained by photographing adocument, a business card, and the like through a camera of a smartphonehas increased. Here, an optical character recognition function fromamong functions used for recognizing a character may have a highprobability of being utilized as a multi-modal software input panel thatprovides another basic input function to the smartphone, along with atouch keypad, a voice recognition, and the like.

A method of recognizing a character image photographed by a mobilecamera provides a user with a function of transferring a result of therecognition to another user via an e-mail or a text message, a functionof connecting to the Internet, and the like. Specifically, when acharacter displayed on a computer screen is recognized by photographingthe character through the camera, a user may readily transfer variouscharacter information from a computer to a smartphone and use theinformation for various purposes, thus improving user convenience.

The method of recognizing a character on the computer screen through useof a mobile camera requires a technical method that is different from aconventional method for recognizing a book, a magazine, and the like.When a character displayed on a computer screen is photographed throughuse of a high definition mobile camera, the resolution of a camera imageis usually greater than the resolution of the computer screen whichresults in image noise that deteriorates a character recognitionperformance on a location of each pixel. Thus, the use of a conventionalcharacter recognition system is limited and an operation of sharpening acomputer screen image and converting a screen image having a lowresolution into an image with a high resolution is not appropriate for ageneral camera-based character recognition system.

SUMMARY OF THE INVENTION

Accordingly, an aspect of the present invention is to solve at least oneof the above-mentioned problems occurring in the prior art. A furtheraim of embodiments of the present invention is to provide a method andapparatus for recognizing a character from a photographed image obtainedby photographing a display screen such as a TV screen, a computerscreen, and documents such as a newspaper, a book, a magazine, and thelike.

According to a first aspect of the present invention, there is providedan apparatus for recognizing a character based on an input image. Theapparatus includes an input unit configured to receive the input imageand a controller configured to select, from the input image, a region ofimage analysis to be used for image analysis, and to analyze theselected region of image analysis to determine a type of the inputimage, to apply, to the input image, an image effect for distinguishinga character region and a background region in the input image if thetype of the input image indicates that the input image is obtained byphotographing a display screen, to binarize output of the image effectaccording to the determined type of the input image, and to recognize acharacter from the binarized output of the image effect.

According to a second aspect of the present invention, there is provideda method of recognizing a character based on an input image. The methodincludes receiving the input image, selecting, from the input image, aregion of image analysis to be used for image analysis, determining atype of the input image by analyzing the selected region of imageanalysis, applying, to the input image, an image effect fordistinguishing a character region and a background region in the inputimage if the type of the input image indicates that the input image isobtained by photographing a display screen, binarizing output of theimage effect according to the determined type of the input image, andrecognizing a character from the binarized output of the image effect.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects, features and advantages of the presentinvention will be more apparent from the following detailed descriptiontaken in conjunction with the accompanying drawings, in which:

FIG. 1 is a diagram illustrating a character recognizing apparatusaccording to an embodiment of the present invention;

FIG. 2 is a flowchart illustrating a process where a characterrecognizing apparatus determines a type of an input image and recognizesa character based on a result of the determination according to anembodiment of the present invention;

FIG. 3 is a flowchart illustrating a process where an image determiningunit determines a type of an input image according to an embodiment ofthe present invention;

FIGS. 4 through 10 are diagrams illustrating a process where an imagedetermining unit determines a type of an input image according to anembodiment of the present invention; FIG. 11 is a diagram illustrating aprocess where an image effect unit applies an effect to an input imageaccording to an embodiment of the present invention;

FIG. 12 is a diagram illustrating a result of character recognitionoutput by a result output unit according to an embodiment of the presentinvention; and

FIG. 13 is a diagram illustrating an example when an input image isdetermined by an image determining unit as an image obtained byphotographing a document according to an embodiment of the presentinvention.

DETAILED DESCRIPTION OF THE EMBODIMENTS OF THE PRESENT INVENTION

Hereinafter, embodiments of the present invention are described indetail with reference to the accompanying drawings. In the followingdescription, a detailed description of known functions andconfigurations is omitted to avoid obscuring the subject matter of thepresent invention.

FIG. 1 illustrates a character recognizing apparatus according to anembodiment of the present invention.

The character recognizing apparatus includes a camera unit 10, an imagedetermining unit 20, an image effect unit 30, a binarizing unit 40, acharacter recognizing unit 50, and a result output unit 60.

The camera unit 10 outputs an input image by converting an input opticalsignal into an image frame.

The image determining unit 20 determines a type of a photographed imagecorresponding to the input image, and outputs the input image to theimage effect unit 30 or the binarizing unit 40 based on a result of thedetermination. For example, the image determining unit 20 determineswhether the input image corresponds to an image obtained byphotographing a display screen such as a computer screen or a TV screen,or corresponds to an image obtained by photographing a document such asa newspaper, a book, a magazine, and the like. When the result showsthat the input image is an image obtained by photographing a displayscreen, the image determining unit 20 outputs the input image to theimage effect unit 30. When the input image is an image obtained byphotographing a document, the image determining unit 20 outputs theinput image to the binarizing unit 40.

Specifically, the image determining unit 20 may use a frequency domainanalysis method and a classifier-based method, to analyze a type of theinput image.

First, the frequency domain analysis method may select a Region OfInterest (ROI) in the input image, and extracts a frequency distributioncharacteristic from the selected ROI to analyze the extracted frequencydistribution characteristic. Here, the ROI may refer to a few regions ofinterest in an entire image region.

Subsequently, the classifier-based method extracts characteristics of animage corresponding to a computer screen and characteristics ofremaining images, generates a binary classifier by learning theextracted characteristics through use of a classifier, and applies thebinary classifier to a characteristic recognition system.

According to one aspect of the present invention, a Discrete CosineTransform (DCT) method is applied as the frequency analysis method.

The image effect unit 30 applies a predetermined effect to the inputphotographed image if the result of the determination indicates that theinput image is an image obtained by photographing a display screen, andoutputs a modified image. Specifically, the image effect unit 30 appliesan image blurring effect, to the photographed image, to decrease adifference in color between a character region and a background region.

The binarizing unit 40 may binarize the modified image (the input imageto which the effect is applied) or the photographed image input from theimage determining unit 20, to generate a binarized image. Specifically,the binarizing unit 40 performs binarizing on the photographed image, toconvert the photographed image into a code that a computer is able torecognize, such as 0 and 1. The binarizing unit 40 converts the inputimage or the modified image to a binary image. For instance, thebinarizing unit 40 may create a binary image (a binarized image) from animage by replacing all pixel values with a brightness, intensity and/orcolour above a threshold with a 1 and all others with a 0.

The character recognizing unit 50 recognizes a character from thebinarized image. Specifically, the character recognizing unit 50recognizes a character based on an optical character recognition scheme.

The result output unit 60 outputs a result value of the characterrecognition.

According to an embodiment of the present invention, whether the inputimage corresponds to an image obtained by photographing a display screenor an image obtained by photographing a document is determined and thus,a character included in the image obtained by photographing a displayscreen is accurately recognized.

FIG. 2 illustrates a process where a character recognizing apparatusdetermines a type of an input image and recognizes a character based ona result of the determination according to an embodiment of the presentinvention.

In step 200, the camera unit 10 may capture an input image. In step 201,the image determining unit 20 may analyze an ROI in the input image, todetermine a type of the input image. For example, the image determiningunit 20 determines whether the type of the input image corresponds to acomputer screen image obtained by photographing a computer screen orcorresponds to remaining images.

In step 202, the image determining unit 20 determines whether the inputimage is the computer screen image, and may proceed with step 204 whenthe input image is determined as the computer screen image. When theinput image is different from the computer screen image, the imagedetermining unit 20 may proceed with step 203 where the binarizing unit40 binarizes the input image to generate a binarized image.

In step 204, the image effect unit 30 applies an effect to the inputimage so that a color difference between a background region and acharacter region in the input image is reduced. In this example, theeffect is a blurring effect.

In step 205, the binarizing unit 40 binarizes the input image to whichthe effect is applied, to generate the binarized image.

The character recognizing unit 50 that proceeds with steps 203 through206 recognizes a character from the generated binarized image. In thisexample, the recognition is performed based on an OCR scheme.

In step 207, the result output unit 60 outputs a result of the characterrecognition, and may complete a character recognition process.

According to an embodiment of the present invention, it is determinedwhether the input image corresponds to an image obtained byphotographing a display screen or an image obtained by photographing adocument and thus, a character included in the image obtained byphotographing the display screen is accurately recognized.

Operations of the image determining unit 20 that determines a type ofthe input image will be described with reference to FIGS. 3 through 10.According to an embodiment of the present invention, the imagedetermining unit 20 may analyze an image based on a DCT method.

FIG. 3 illustrates a process where an image determining unit determinesa type of an input image according to an embodiment of the presentinvention. FIGS. 4 through 10 illustrate a process where an imagedetermining unit determines a type of an input image according to anembodiment of the present invention.

Referring to FIG. 3, the image determining unit 20 may select, from aninput image, a predetermined ROI to analyze a type of an image in step300. For example, the image determining unit 20 may select an ROI 400having a predetermined size from the input image as illustrated in FIG.4. Generally, a resolution of a camera image is greater than aresolution of a display screen and thus, the ROI 400 may have a latticenoise as illustrated in FIG. 5.

In step 301, the image determining unit 20 may divide the ROI 400 intoanalysis regions of a predetermined size. For example, the imagedetermining unit 20 may divide an ROI, 8×n pixels in width and 8×mpixels in height, into analysis blocks of a predetermined size, such asa first analysis block that has a predetermined size and is located in afirst row and a first column, an i^(th) analysis block that has apredetermined size and is located in an i^(th) row and an j^(th) column,and an n^(th) analysis block that has a predetermined size and islocated in an n^(th) row and an m^(th) column, as illustrated in FIG. 6.Here, i, j, n and m are positive integers.

The size of the ROI is set to a multiple of an 8×8 DCT analysis block,or set to have a form of another DCT analysis block. Also, one or moreROIs may be set.

In step 302, the image determining unit 20 generates a representativeanalysis block by superposing the divided analysis blocks to match eachpixel corresponding to the same location. Specifically, the imagedetermining unit 20 may superpose the first analysis block, . . . , thei^(th) analysis block, . . . , and the n^(th) analysis block so thatpixels in the same location of the analysis blocks may match, and may agenerate a representative analysis block as illustrated in FIG. 7 andFIG. 8. In this example, the image determining unit 20 performssuperposing so that a pixel corresponding to a location of a11 of thefirst analysis block, . . . , a pixel corresponding to a location of a11of the i^(th) analysis block, . . . , and a pixel corresponding to alocation of a11 of the n^(th) analysis block may match, and pixelscorresponding to remaining locations may match in this manner and thus,generates the representative analysis block.

In step 303, the image determining unit 20 calculates a representativecolor value for each pixel in the generated representative analysisblock. Specifically, the image determining unit 20 may calculate a totalsum of color values of corresponding pixels of the superposed analysisblocks, for example, the first analysis block, . . . , the i^(th)analysis block, . . . , and the n^(th) analysis block, as arepresentative color value for each pixel in the representative analysisblock. For example, a representative color value for a pixelcorresponding to a location of A11 of FIG. 8 is represented by a totalsum of a color value of a pixel corresponding to a location of a11 ofthe first analysis block, . . . , a color value of a pixel correspondingto a location of a11 of the analysis block, . . . , and a color value ofa pixel corresponding to a location of a11 of the n^(th) analysis block.

In step 304, the image determining unit 20 calculates a first averagerepresentative color value of pixels corresponding to a location of afirst row and pixels corresponding to a location of a first column,excluding a pixel having a maximum representative color value in therepresentative analysis block. In this example, the pixels correspondingto the first row and the pixels corresponding to the first column mayindicate pixels included in a row and pixels included in a column wherepixels having relatively high representative color values exist.Generally, a display screen image to which a DCT analysis method isapplied may have DCT analysis pattern blocks such as a predeterminedregion 900 of the ROI 400 in FIG. 9. The DCT analysis pattern block maycorrespond to an analysis block, and a pixel corresponding to a firstrow and a first column, such as a pixel located in a location of A11 ofFIG. 8, may have a maximum representative color value.

That is, the image determining unit 20 calculates the first averagerepresentative color value of pixels corresponding to A12, A13, . . . ,and A18 1000, and pixels corresponding to A21, A31, . . . , and A811001, excluding a pixel corresponding to A11, as illustrated in FIG. 10.

In step 305, the image determining unit 20 may calculate a secondaverage representative color value of remaining pixels in therepresentative analysis block. Specifically, the image determining unit20 calculates the second average representative color value of pixelscorresponding to A22, A23, . . . , A32, A33, . . . , A42, A43, . . . ,A52, A53, . . . , A62, A63, . . . , A72, A73, . . . , A82, A83, . . . ,A88 1002, as illustrated in FIG. 10.

In step 306, the image determining unit 20 determines whether adifference value between the first average representative color valueand the second average representative color value is greater than orequal to a predetermined threshold color value, and may proceed withstep 308 when the difference value is greater than or equal to thepredetermined threshold color value. Otherwise, the image determiningunit 20 determines the input image as a general image in step 307. Here,the predetermined threshold color value is a predetermined referencevalue to be used for determining whether the input image is a displayscreen image.

In step 308, the image determining unit 20 determines the input image asa display screen image such as a computer screen image.

In step 309, the image determining unit 20 outputs a result of thedetermination, and may complete an image determining process.

FIG. 11 illustrates a process where an image effect unit applies aneffect to an input image according to an embodiment of the presentinvention.

Referring to FIG. 11, the image effect unit 30 generates aneffect-applied image 1101 obtained by applying a blurring effect to aninput image 1100, to clearly distinguish a character region and abackground region. Noise, such as a lattice noise, may occur in theinput image 1100 as illustrated in FIG. 11 and thus, the characterregion may not be accurately recognized when character recognition isperformed on the input image 1100. Accordingly, the image effect unit 30applies an image blurring effect so that a difference value between acolor value of the character region and a color value of the backgroundregion is greater than or equal to a predetermined threshold differencevalue and thus, the character region and the background region areclearly distinguished. The effect-applied image 1101 may minimize noisesuch as a lattice noise as illustrated in FIG. 11 and thus, a characterand a background is clearly distinguished from each other. When theeffect-applied image 1101 is binarized through the binarizing unit 40, abinarized image 1102 is generated as illustrated in FIG. 11. In thebinarized image 1102, the character region is distinctly distinguishedfrom the background region so that the character region is clearlyrecognized.

FIG. 12 illustrates a result of character recognition output by a resultoutput unit according to an embodiment of the present invention.

When an image 1200 obtained by photographing a computer screen is inputas illustrated in FIG. 12, a type of the input image is determinedthrough the processes described above, and the result output unit 60outputs a result image 1201 of character recognition performed throughuse of a character recognition method based on a result of thedetermination.

FIG. 13 illustrates an example when an input image is determined by animage determining unit as an image obtained by photographing a documentaccording to an embodiment of the present invention.

Referring to FIG. 13, the image determining unit 20 may select apredetermined ROI from an input image 1300, and determines a type of theinput image 1300 by analyzing the ROI. In this example, when the inputimage is an image obtained by photographing a document, DCT analysispattern blocks such as a block 1301 is obtained by analyzing the ROIbased on a DCT analysis method.

The image determining unit 20 determines the input image 1300 as adocument image by analyzing the DCT analysis pattern blocks.

According to an embodiment of the present invention, whether the inputimage corresponds to an image obtained by photographing a display screenor an image obtained by photographing a document is determined and thus,a character included in the image obtained by photographing the displayscreen may be accurately recognized.

According to an embodiment of the present invention, characterinformation displayed on a screen that variably displays variousinformation is readily shared through use of a portable terminal withoutcomplex processes, for example, a process for wireless connection orInternet access.

According to an embodiment of the present invention, charactersdisplayed on a display screen are conveniently recognized through use ofa portable terminal.

It will be appreciated that embodiments of the present invention can beimplemented in the form of hardware, software or a combination ofhardware and software. Any such software may be stored in the form ofvolatile or non-volatile storage such as, for example, a storage devicelike a ROM, whether erasable or rewritable or not, or in the form ofmemory such as, for example, RAM, memory chips, device or integratedcircuits or on an optically or magnetically readable medium such as, forexample, a CD, DVD, magnetic disk or magnetic tape or the like. It willbe appreciated that the storage devices and storage media areembodiments of machine-readable storage that are suitable for storing aprogram or programs comprising instructions that, when executed,implement embodiments of the present invention.

Accordingly, embodiments of the present invention provide a programcomprising code for implementing apparatus or a method as claimed in anyone of the claims of this specification and a machine-readable storagestoring such a program. Still further, such programs may be conveyedelectronically via any medium such as a communication signal carriedover a wired or wireless connection and embodiments suitably encompassthe same.

Throughout the description and claims of this specification, the words“comprise” and “contain” and variations of the words, for example“comprising” and “comprises”, means “including but not limited to”, andis not intended to (and does not) exclude other components, integers orsteps.

Throughout the description and claims of this specification, thesingular encompasses the plural unless the context otherwise requires.In particular, where the indefinite article is used, the specificationis to be understood as contemplating plurality as well as singularity,unless the context requires otherwise.

Features, integers or characteristics described in conjunction with aparticular aspect, embodiment or example of the invention are to beunderstood to be applicable to any other aspect, embodiment or exampledescribed herein unless incompatible therewith.

It will be also be appreciated that, throughout the description andclaims of this specification, language in the general form of “X for Y”(where Y is some action, activity or step and X is some means forcarrying out that action, activity or step) encompasses means X adaptedor arranged specifically, but not exclusively, to do Y.

While the invention has been shown and described with reference tocertain various embodiments thereof, it will be understood by thoseskilled in the art that various changes in form and detail may be madetherein without departing from the scope of the invention as defined bythe appended claims.

What is claimed is:
 1. An apparatus for recognizing a character based onan input image, the apparatus comprising: an input unit configured toreceive the input image; and a controller configured to: select, fromthe input image, a region of image analysis to be used for imageanalysis, and to analyze the selected region of image analysis todetermine a type of the input image; to apply, to the input image, animage effect for distinguishing a character region and a backgroundregion in the input image if the type of the input image indicates thatthe input image is obtained by photographing a display screen; tobinarize output of the image effect according to the determined type ofthe input image; and to recognize a character from the binarized outputof the image effect.
 2. The apparatus of claim 1, wherein the controlleris further configured to divide the selected region of image analysisinto analysis blocks of a predetermined size, to generate arepresentative analysis block by superposing the divided analysis blocksto match each pixel corresponding to a same location, to calculate arepresentative color value of each pixel included in the representativeanalysis block, and to analyze the input image based on each calculatedrepresentative color value.
 3. The apparatus of claim 2, wherein thecontroller is further configured to calculate a first averagerepresentative color value of pixels included in a row and a columnwhere pixels having relatively high representative color values exist inthe representative analysis block, excluding a pixel having a maximumrepresentative color value in the representative analysis block, tocalculate a second average representative color value of remainingpixels, to compare the first average representative color value and thesecond average representative color value, and to determine the type ofthe input image based on a result of the comparison.
 4. The apparatus ofclaim 3, wherein the controller is further configured to determinewhether a difference value between the first average representativecolor value and the second average representative color value is greaterthan or equal to a predetermined threshold color value, to determine theinput image as a display screen image when the difference value isgreater than or equal to the threshold color value, and to determine theinput image as an image different from the display screen image when thedifference value is less than the threshold color value.
 5. Theapparatus of claim 1, wherein the controller is further configured toapply a blurring effect to the input image so that a difference valuebetween a color value of the character region and a color value of thebackground region in the input image is greater than or equal to apredetermined threshold difference value.
 6. A method of recognizing acharacter based on an input image, the method comprising: receiving theinput image; selecting, from the input image, a region of image analysisto be used for image analysis; determining a type of the input image byanalyzing the selected region of image analysis; applying, to the inputimage, an image effect for distinguishing a character region and abackground region in the input image if the type of the input imageindicates that the input image is obtained by photographing a displayscreen; binarizing output of the image effect according to thedetermined type of the input image; and recognizing a character from thebinarized output of the image effect.
 7. The method of claim 6, whereindetermining the type of the input image comprises: dividing the selectedregion of image analysis into analysis blocks of a predetermined size;generating a representative analysis block by superposing the dividedanalysis blocks to match each pixel corresponding to a same location;calculating a representative color value of each pixel included in therepresentative analysis block; and analyzing the input image based oneach calculated representative color value.
 8. The method of claim 7,wherein analyzing the input image comprises: calculating a first averagerepresentative color value of pixels included in a row and a columnwhere pixels having relatively high representative color values exist inthe representative analysis block, excluding a pixel having a maximumrepresentative color value in the representative analysis block;calculating a second average representative color value of remainingpixels; and comparing the first average representative color value andthe second average representative color value to determine a type of theinput image based on a result of the comparison.
 9. The method of claim8, wherein determining the type of the input image comprises:determining whether a difference value between the first averagerepresentative color value and the second average representative colorvalue is greater than or equal to a predetermined threshold color value;determining the input image as a display screen image when thedifference value is greater than or equal to the threshold color value;and determining the input image as an image different from the displayscreen image when the difference value is less than the threshold colorvalue.
 10. The method of claim 6, wherein applying the image effect fordistinguishing the character region and the background region comprises:applying a blurring effect to the input image so that a difference valuebetween a color value of the character region and a color value of thebackground region in the input image is greater than or equal to apredetermined threshold difference value.